<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>提现额度增长记录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

    <link rel="stylesheet" href="../default/css/mui.min.css">
    <link rel="stylesheet" type="text/css" href="../default/css/index.css"/>
    <link rel="stylesheet" type="text/css" href="../default/css/animat.min.css"/>
    <style type="text/css">
        .mui-content>.mui-table-view:first-child {
            margin-top: -1px;
        }
        html,
        body {
            background-color: #efeff4;
        }
        .mui-card-content-inner p{
            padding: 5px 0;
        }
        .mui-table-view-cell p{
            color: #0c0c0c;
            font-size: 16px;
            font-size: 550;
            margin-bottom: 15px;
        }
    </style>
</head>

<body>
<header class="mui-bar mui-bar-nav">
    <a class="mui-icon mui-icon-left-nav mui-pull-left backahter"></a>
    <h1 class="mui-title">提现额度增长记录</h1>
</header>
<!--下拉刷新容器-->
<div id="pullrefresh" class="mui-content mui-scroll-wrapper">
    <div class="mui-scroll">
        <!--数据列表-->
        <ul class="mui-table-view mui-table-view-chevron" id="task-quota-list"></ul>
    </div>
</div>


<script src="../default/js/jquery-2.14.js" type="text/javascript" charset="utf-8"></script>
<script src="../default/js/mui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../default/js/cookie.js"></script>
<script src="../default/js/code.js" type="text/javascript" charset="utf-8"></script>
<script src="../default/js/index.js" type="text/javascript" charset="utf-8"></script>
<script src="../default/js/public.js"></script>

<script>

    var startingNumber=0;
    var page=30;
    mui.init({
        pullRefresh: {
            container: '#pullrefresh',
            up: {
                auto:true,
                contentrefresh: '正在加载...',
                callback: function () {
                    var self = this;
                    if(startingNumber==0){
                        quota(startingNumber);
                    }else {
                        startingNumber=startingNumber+page;
                        quota(startingNumber);
                    }
                }
            }
        }
    });


    function quota(startingNumber) {
        $.ajax({
            url:website+'/DetailedQuotaController/findByUserAll',
            type:'post',
            data:{
                userId:userId,
                startingNumber:startingNumber
            },
            success:function (data) {
                var html='';
                data.data.forEach(function (value) {
                    html+='<li class="mui-table-view-cell"><p>增长金额:<b class="red">'+value.rewardQuantity+'</b></p><p>增长时间:'+value.rewardTime+'</p></li>'
                });

                if (data.data.length == 0) {
                    mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
                } else if (data.data.length < page) {
                    $("#task-quota-list").html(html);
                    mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
                } else {
                    $("#task-quota-list").html(html);
                    mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
                }



            },error:function () {
                mui.showLoading("发生错误,返回首页..","div");
                setTimeout(function () {
                    window.location.href = 'http://newst.whilte.com/index.html';
                },1000)
            }
        })
    }


    mui('header').on('tap', '.backahter', function (e) {
        //打开详情页面
        mui.openWindow({
            url: 'task.html'
        });
    });

</script>
</body>

</html>